package com.kcyu.egoodsmapbackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kcyu.egoodsmapbackend.entity.FileDO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.Serializable;
import java.util.List;

/**
 * @author yujiancong
 * @description 针对表【file(文件)】的数据库操作Service
 * @createDate 2024-01-02 11:50:38
 */
public interface FileService extends IService<FileDO> {

    FileDO upload(MultipartFile file, String modelCode, String busiKey) throws IOException;

    List<FileDO> queryFile(String modelCode, String busiKey);

    boolean removeFile(Serializable fileId);

    String uploadAsset(MultipartFile file);

    void getAssets(String filePath, HttpServletResponse response) throws IOException;

    Boolean moveFile(String fileId, String targetDir);

}
